package com.woniu.aimd.controller;

import com.woniu.aimd.pojo.entity.Wronganswerquestion;
import com.woniu.aimd.service.impl.SearchServiceLmpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("Search")
public class SearchController {
    @Autowired
    SearchServiceLmpl searchService;
    @RequestMapping("findpromptC")
    public List<String>findpromptC(String user_id,Integer status
){return searchService.findpromptC(user_id,status);}
     @RequestMapping("findpromptA")
    public List<String>findpromptA(String user_id,Integer status
    ){return searchService.findpromptA(user_id,status);}
    @RequestMapping("findanswerquestionprompt")
    public List<Wronganswerquestion>findanswerquestionprompt(@RequestParam String prompt
    ){
        return searchService.findanswerquestionprompt(prompt);
    }
    @RequestMapping("findchoicequestionprompt")
    public List<Wronganswerquestion> findchoicequestionprompt(@RequestParam String prompt) {
        return searchService.findanswerquestionprompt(prompt);
    }
}
